package com.inspur.cloud.demo.repository;

import com.inspur.cloud.demo.entity.FlinkConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface FlinkRespository extends JpaRepository<FlinkConfig, String> {

    FlinkConfig findByType(String type);

    @Query(value = "select id,type,flinkversion,zeppelinserver,zeppelinport,flinkstreamsqlserver,flinkstreamsqlport, " +
            " flinkxserver,flinkxport,flinkserver,flinkport from FlinkConfig t")
    List<FlinkConfig> getFlinkConfig();
}